﻿@model IEnumerable<SienSchoofsProject.Models.FilmReview>

<table class="reviews">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Rating)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Body)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ReviewerName)
        </th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Rating)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Body)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ReviewerName)
            </td>
            <td>
                @if (User.IsInRole("admin"))
                {
                    @Html.ActionLink(Resources.Edit, "Edit", new { id = item.Id }) 
                    //@("|") @Html.ActionLink(Resources.Delete, "Delete", new { id=item.Id })
                }
            </td>
        </tr>
    }

</table>
